<template>
    <div>
        <!-- 搜索和添加栏 -->
  <div class="search-lan" id="search">
    <el-input v-model="input" placeholder="请输入内容"></el-input>
    <el-button type="primary">查询</el-button>
    <!-- <el-button type="primary">添加</el-button> -->
  </div>
        <order-form :item="data"/>
   <el-footer>
 <el-pagination
    layout="prev, pager, next"
     :page-count="data.sumpage"
            @current-change="handleCurrentChange">
  </el-pagination>
   </el-footer>
    </div>
</template>

<script>
import OrderForm from '@/components/OrderForm.vue'
    export default {
  components: { OrderForm },
        
    data() {
      return {
        data:'',
        input:'',
         page:'1',
      }
    },
    methods: {
          handleCurrentChange(val) {
        console.log(`当前页: ${val}`);
        this.page=val
        console.log(this.page)
        this.getsldata()
      },
       getsldata(){
      const url = `/dd_fy?pageSize=5&&curpage=${this.page}`;
    this.axios.get(url).then((res) => {
      this.data = res.data;
      console.log(res);
    });
    },
    },
    mounted () {
    this.getsldata()
 }  
    } 
</script>

<style lang="scss" scoped>
#search {
    display: flex;
    margin-bottom: 20px;
}
</style>